<h1><%=@pool.name%> Entries For <%=current_user.login%></h1>

<% if @entries.empty? %>
<p>
You have no entries.
</p>
<% else %>
<ul>
<% @entries.each do |entry| %>
<li><%= link_to entry.name, :action => 'show', :id => entry.id %> <% if entry.completed %><span class="entryCompleted">COMPLETED</span><%else%><span class="entryPending">PENDING</span><%end%></li>
<% end %>
</ul>
<% end %>
<% if @pool.accepting_entries? -%>
<p>
<%= link_to 'Create a new entry', :action => 'new', :id => @pool.id %>
</p>
<% elsif !@pool.started? -%>
<i>This pool is not yet ready.  The pool starts in <%= distance_of_time_in_words(@pool.starts_at, Time.now) %>.  Once all the teams in the tournament have 
been selected, you will be able to create entries.</i>
<% elsif @pool.started? && !@pool.completed? -%>
<i>This pool is not accepting any more entries.</i>
<% elsif @pool.completed? -%>
<i>This pool is over.</i>
<% end -%>
